//
//  GSServerManagerConsts.h
//  AgileNYC
//
//  Created by Admin on 16.05.14.
//  Copyright (c) 2014 Softlegion. All rights reserved.
//

#ifndef AgileNYC_GSServerManagerConsts_h
#define AgileNYC_GSServerManagerConsts_h

typedef enum {  GSEmailLoginType = 0,
    GSFacebookLoginType = 1,
    GSGooglePlusLoginType = 2,
    GSLinkedInLoginType = 3
} GSLoginType;

typedef enum {
    GSMobileTypeCDMA,
    GSMobileTypeGSM
} GSMobileType;

typedef enum {
    GSDeviceOsTypeiOs,
    GSDeviceOsTypeAndroid
} GSDeviceOsType;


static GSDeviceOsType myDeviceOSType = GSDeviceOsTypeiOs;
static GSMobileType myDeviceMobileType = GSMobileTypeGSM;


#pragma mark - Server addresses //Адреса для отправки GET и POST реквестов

#ifdef LOCAL_DATA
        static NSString * agileURL = @"";
#elif DEBUG
        static NSString * agileURL = @"http://81.95.226.86:84/";
        //static NSString * agileURL = @"https://rapidsquere.cloudapp.net/";
#elif AD_HOC
        static NSString * agileURL = @"https://rapidsquere.cloudapp.net/";
#else
        static NSString * agileURL = @"https://rapidsquere.cloudapp.net/";
#endif

static NSString * photoPostfix = @"photo.ashx?code=";

#pragma mark - Server methods names // Наименование методов для get и post


#ifdef LOCAL_DATA


#else

        static NSString * usersGroup                = @"AgileUsers.svc";
        static NSString * eventsGroup               = @"AgileEvents.svc";
        static NSString * syncGroup                 = @"AgileSync.svc";
        static NSString * photoGroup                = @"photo.ashx";

        static NSString * checkUserEmailMethod      = @"CheckEmail";
        static NSString * createUserMethod          = @"Register";
        static NSString * loginUserMethod           = @"Login";
        static NSString * getUserMethod             = @"GetUserDetails";
        static NSString * putUserMethod             = @"SaveUserDetails";
        static NSString * putPhotoMethod            = @"UploadPhoto";
        static NSString * deletePhotoMethod         = @"DeletePhoto";

        static NSString * getEventsListMethod       = @"Events";
        static NSString * checkInOnEventMethod      = @"CheckIn";
        static NSString * rateEventMethod           = @"Rating";

        static NSString * connectMethod             = @"SendNotification";
        static NSString * connectionReplyMethod     = @"ReplyNotification";
        static NSString * connectionCheckMethod     = @"CheckNotification";
        static NSString * deleteContactMethod       = @"DeleteContact";
        static NSString * saveNotesForContactMethod = @"AddNote";

        static NSString * getContactsMethod         = @"Contacts";

#endif

#pragma mark - JSON amswer keys - Ключи JSON ответов от серевера

static NSString * jsonNullValue             = @"<null>";

static NSString * eventsResponseKey         = @"EventsResult";
static NSString * userInfoResponseKey       = @"GetResult";
static NSString * notificationResponseKey   = @"CheckNotificationResult";


static NSString * userIDKey             = @"Id";
static NSString * userNameKey           = @"Name";
static NSString * userFirstNameKey      = @"FirstName";
static NSString * userLastNameKey       = @"LastName";
static NSString * userPhoneKey          = @"Phone";
static NSString * userWebSiteKey        = @"Site";
static NSString * userMemoKey           = @"Info";
static NSString * userPhotoKey          = @"ImageUrl";
static NSString * userEmailKey          = @"Email";
static NSString * userPasswordKey       = @"Password";
static NSString * userAddPhotoKey       = @"CustomImageUrl";
static NSString * userCompanyNameKey    = @"Company";
static NSString * userSessionIDKey      = @"Code";
static NSString * userCityKey           = @"City";
static NSString * userNotesKey          = @"Note";
static NSString * userStateKey          = @"State";
static NSString * userTitleKey          = @"Title";
static NSString * userTokenKey          = @"UserToken";

static NSString * userSocialTypeKey     = @"SocialType";
static NSString * userSocialIdKey       = @"SocialId";
static NSString * userFacebookIdKey     = @"FacebookId";
static NSString * userGoogleIdKey       = @"GooglePlusId";
static NSString * userLinkedInIdKey     = @"LinkedInId";
static NSString * userFacebookNameKey   = @"FacebookName";
static NSString * userGoogleNameKey     = @"GooglePlusName";
static NSString * userLinkedInNameKey   = @"LinkedInName";

static NSString * eventNameKey          = @"Topic";
static NSString * eventIDKey            = @"Id";
static NSString * eventTimeFromKey      = @"StartTime";
static NSString * eventTimeToKey        = @"EndTime";
static NSString * eventTrackKey         = @"Room";
static NSString * eventDescriptionKey   = @"Introduction";
static NSString * eventLecturerNameKey  = @"Author";
static NSString * eventPhotoKey         = @"AuthorImageUrl";
static NSString * eventAvgRaitingKey    = @"AvgRating";
static NSString * eventMyRaitingKey     = @"UserRating";
static NSString * eventIsCheckInKey     = @"IsCheckIn";

static NSString * errorKey              = @"Error";
static NSString * resultKey             = @"Result";
static NSString * modifiedDateKey       = @"ModifiedDate";
static NSString * unknownUserAnswer     = @"Unknown User";

static NSString * facebookURL = @"HTTPS://graph.facebook.com/";
static NSString * googlePlusURL = @"https://www.googleapis.com/plus/v1/";
static NSString * linkedInURL = @"https://api.linkedin.com/v1/";

static NSString * facebookAppId = @"586829701412865";
static NSString * googlePlusAppId = @"1053622429674-m0qqv3p5btcp6gerns4100f8p7a4kl5n.apps.googleusercontent.com";
static NSString * linkedInAppId = @"75ex6a7lqg6o5t";

static NSString * facebookSecret = @"";
static NSString * googlePlusSecret = @"";
static NSString * linkedInSecret = @"FRBwheC1uMyTOL8U";

static NSString * facebookRedirectURL = @"fbconnect://success";
static NSString * googlePlusRedirectURL = @"http://localhost";
static NSString * linkedInRedirectURL = @"http://www.incrementor.com";

//Redirect key names (are defferent for each resource)
static NSString * facebookCodeKey = @"";
static NSString * googlePlusCodeKey = @"code";
static NSString * linkedInCodeKey = @"code";

static NSString * facebookTokenKey = @"access_token";
static NSString * googlePlusTokenKey = @"code";
static NSString * linkedInTokenKey = @"access_token";

static NSString * facebookExpiredKey = @"expires_in";
static NSString * googlePlusExpiredKey = @"";
static NSString * linkedInExpiredKey = @"expires_in";

static NSString * facebookUserIdKey = @"";
static NSString * googlePlusUserIdKey = @"";
static NSString * linkedInUserIdKey = @"";

static NSString * facebookErrorKey = @"";
static NSString * googlePlusErrorKey = @"";
static NSString * linkedInErrorKey = @"error_description";


// Надо будет сделать случайную генерацию строки
static NSString * facebookStateString = @"mTu83do3aEL356aaI2s5D";
static NSString * googlePlusStateString = @"G9jsiFryZ29200ks11JOs";
static NSString * linkedInStateString = @"Af63Klm9Vv12sqAu44JTx";


#endif
